package lq.common.selector;

import lq.common.configure.StudyAuthExceptionConfigure;
import lq.common.configure.StudyOAuth2FeignConfigure;
import lq.common.configure.StudyServerProtectConfigure;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @program: cloud-study
 * @description: 整合微服务必须的配置注解
 * 将多个@Enable类型注解将配置类注册到IOC容器中的整合到一起
 * 在spring中整合使用selector方式
 * @author: LQ
 * @create: 2021-01-26 10:17
 */

public class StudyCloudApplicationSelector implements ImportSelector {
    /**
     * 重写方法整合配置
     * @param annotationMetadata
     * @return
     */
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{
                StudyAuthExceptionConfigure.class.getName(),
                StudyOAuth2FeignConfigure.class.getName(),
                StudyServerProtectConfigure.class.getName()
        };
    }
}
